from flask import Flask
from flask_sqlalchemy import SQLAlchemy

from config import Config



db = SQLAlchemy()

def create_app():
    app = Flask(__name__)

    app.config.from_object(Config)

    db.init_app(app)

    from apps.index import index_app
    app.register_blueprint(index_app)

    from apps.test import test_app
    app.register_blueprint(test_app)

    from apps.reco import reco_app
    app.register_blueprint(reco_app)

    return app